.class Lcom/netease/newsreader/util/NeteaseHttpClient$4;
.super Ljava/lang/Object;
.source "NeteaseHttpClient.java"

# interfaces
.implements Lorg/apache/http/conn/ConnectionKeepAliveStrategy;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/netease/newsreader/util/NeteaseHttpClient;->getHttpClient(Lorg/apache/http/params/HttpParams;)Lorg/apache/http/impl/client/DefaultHttpClient;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# direct methods
.method constructor <init>()V
    .locals 0

    .prologue
    .line 186
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 1
    return-void
.end method


# virtual methods
.method public getKeepAliveDuration(Lorg/apache/http/HttpResponse;Lorg/apache/http/protocol/HttpContext;)J
    .locals 9
    .parameter "response"
    .parameter "context"

    .prologue
    const-wide/16 v5, 0x4e20

    .line 189
    new-instance v2, Lorg/apache/http/message/BasicHeaderElementIterator;

    .line 190
    const-string v7, "Keep-Alive"

    invoke-interface {p1, v7}, Lorg/apache/http/HttpResponse;->headerIterator(Ljava/lang/String;)Lorg/apache/http/HeaderIterator;

    move-result-object v7

    .line 189
    invoke-direct {v2, v7}, Lorg/apache/http/message/BasicHeaderElementIterator;-><init>(Lorg/apache/http/HeaderIterator;)V

    .line 191
    .local v2, iterator:Lorg/apache/http/HeaderElementIterator;
    :cond_0
    invoke-interface {v2}, Lorg/apache/http/HeaderElementIterator;->hasNext()Z

    move-result v7

    if-nez v7, :cond_1

    .line 203
    :goto_0
    return-wide v5

    .line 192
    :cond_1
    invoke-interface {v2}, Lorg/apache/http/HeaderElementIterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lorg/apache/http/HeaderElement;

    .line 193
    .local v1, header:Lorg/apache/http/HeaderElement;
    invoke-interface {v1}, Lorg/apache/http/HeaderElement;->getName()Ljava/lang/String;

    move-result-object v3

    .line 194
    .local v3, param:Ljava/lang/String;
    invoke-interface {v1}, Lorg/apache/http/HeaderElement;->getValue()Ljava/lang/String;

    move-result-object v4

    .line 195
    .local v4, value:Ljava/lang/String;
    if-eqz v4, :cond_0

    const-string v7, "timeout"

    invoke-virtual {v3, v7}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v7

    if-eqz v7, :cond_0

    .line 197
    :try_start_0
    invoke-static {v4}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-wide v5

    const-wide/16 v7, 0x3e8

    mul-long/2addr v5, v7

    goto :goto_0

    .line 198
    :catch_0
    move-exception v0

    .line 199
    .local v0, e:Ljava/lang/Exception;
    goto :goto_0
.end method
